import pymysql

con = pymysql.connect(host='192.168.153.152',port=3306,user='root',password='123456',database='study',charset='utf8')
print(con)
cursor = con.cursor()
print(cursor)
# cursor.execute('select * from stu')
# data = cursor.fetchall()
# print(data,type(data))
cursor.execute('''insert into stu (name,sex) values('bb','女')''')
con.commit()
cursor.close()
con.close()
